package com.opendi.dynamic.controller;

import com.opendi.dynamic.base.ResultBody;
import com.opendi.dynamic.service.ThridOperateService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/third")
@RestController
public class ThirdController {
    @Autowired
    private ThridOperateService thirdOperateService;

    @ApiOperation(value="新增数据源1数据")
    @GetMapping("/addData")
    public ResultBody addData()
    {
        thirdOperateService.addSchoolCharge();
        return ResultBody.ok();
    }

    @ApiOperation(value="同步数据源1数据到数据源2")
    @GetMapping("/syncData")
    public ResultBody syncData()
    {
        thirdOperateService.syncData();
        return ResultBody.ok();
    }
}
